<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePicturesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pictures', function (Blueprint $table) {
            $table->increments('id');
            $table->char('name', 8)->comment('图片名称');
            $table->char('src', 128)->comment('图片路径');
            $table->char('url', 128)->comment('图片超链接');
            $table->char('type', 10)->comment('图片类型');
            $table->char('uses', 10)->comment('图片使用区域');
            $table->boolean('status')->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('pictures');
    }
}
